<template>
  <div>
    <h1>父组件</h1>
    <button @click="isShow = !isShow">toggle</button>
    <child v-if="isShow"></child>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import child from './child.vue'
const isShow = ref(true)
</script>

<style lang="scss" scoped></style>
